package com.kuang.oop.demo02;

/**
 * 一个项目应该只存在一个main方法
 * @author wuJiaWei
 * @version 1.0
 * @date 2024/8/12
 * @time 10:25:19
 */
public class Application {
    public static void main(String[] args) {
        //类是抽象的，需要实例化
        //类实例化后会返回一个对象
        //student对象就是一个Student类的具体实例
//        Student xiaoming = new Student();
//        xiaoming.name = "小明";
//        xiaoming.age = 15;
//
//        Student xiaohong = new Student();
//        xiaohong.name = "小红";
//        xiaohong.age = 16;
//
//        System.out.println(xiaoming.name);
//        System.out.println(xiaoming.age);
//        xiaoming.study();
//        System.out.println(xiaohong.name);
//        System.out.println(xiaohong.age);
//        xiaohong.study();

        //实例化Person
        Person person = new Person();
        Person person2 = new Person("test");
        System.out.println(person.name); //null
    }
}
